package es.us.lsi.mwm;

public class ClassA {
    private int a,b;

    public void setA(int a) {
        this.a = a;
    }

    public int getA() {
        return a;
    }

    public void setB(int b) {
        this.b = b;
    }

    public int getB() {
        return b;
    }

    @Override
    public boolean equals(Object object) {
        if (this == object) {
            return true;
        }
        if (!(object instanceof ClassA)) {
            return false;
        }
        final ClassA other = (ClassA) object;
        if (a != other.a) {
            return false;
        }
        if (b != other.b) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        final int PRIME = 37;
        int result = 1;
        result = PRIME * result + a;
        result = PRIME * result + b;
        return result;
    }

    public int incrementaAtributo1(int incremento){
    a=a*incremento;
    return a;
    }
}
